<?php

class BaseController extends Controller {

	public function __construct(){
		//$path= Config::get('app.domain'); //$_SERVER['REQUEST_URI'];
		$pathLocale = URL::to('/')."/".Config::get('app.locale');
		
		View::share('imagesPath', URL::to('/').'/images');		
		View::share('cssPath', URL::to('/').'/css');
		View::share('jsPath', URL::to('/').'/js');
		View::share('bootstrapPath', URL::to('/').'/bootstrap');
		
		View::share('pathLocale', $pathLocale);
		View::share('homeURL', $pathLocale."/home");
	}
	
	
	/**
	 * Setup the layout used by the controller.
	 *
	 * @return void
	 */
	protected function setupLayout()
	{
		
		if ( ! is_null($this->layout))
		{
			$this->layout = View::make($this->layout);
		}
	}

}
